package com.presentation;

import java.util.Map;

import com.bean.HistoryLog;
import com.util.DateHelper;

public class HistoryLogVO {

	public HistoryLogVO() {
	}

	public HistoryLogVO(HistoryLog historyLog, Map<String, String> map) {
		this.leaseIssue = DateHelper.formatDateToString(historyLog
				.getStartTime(), "yyyy-MM-dd HH:mm:ss");
		this.protocol = historyLog.getProtocol();
		this.ipAddress = historyLog.getIpAddress();
		this.macAddress = historyLog.getMacAddress();
		this.DUID = historyLog.getDUID();
		this.hostName = historyLog.getHostName();
		this.action = historyLog.getEvent();
		this.userName = historyLog.getUserName();
		this.startTime = this.leaseIssue;
		this.endTime = DateHelper.formatDateToString(historyLog.getEndTime(),
				"yyyy-MM-dd HH:mm:ss");
		this.member = map.get(historyLog.getMemberOrServer());
		this.memberOrServer = historyLog.getMemberOrServer();
	}
	
	private String leaseIssue;
	private String protocol;
	private String ipAddress;
	private String macAddress;
	private String DUID;
	private String hostName;
	private String action;
	private String userName;
	private String startTime;
	private String endTime;
	private String member;
	private String memberOrServer;

	public String getLeaseIssue() {
		return leaseIssue;
	}

	public void setLeaseIssue(String leaseIssue) {
		this.leaseIssue = leaseIssue;
	}

	public String getProtocol() {
		return protocol;
	}

	public void setProtocol(String protocol) {
		this.protocol = protocol;
	}

	public String getIpAddress() {
		return ipAddress;
	}

	public void setIpAddress(String ipAddress) {
		this.ipAddress = ipAddress;
	}

	public String getMacAddress() {
		return macAddress;
	}

	public void setMacAddress(String macAddress) {
		this.macAddress = macAddress;
	}

	public String getDUID() {
		return DUID;
	}

	public void setDUID(String duid) {
		DUID = duid;
	}

	public String getHostName() {
		return hostName;
	}

	public void setHostName(String hostName) {
		this.hostName = hostName;
	}

	public String getAction() {
		return action;
	}

	public void setAction(String action) {
		this.action = action;
	}

	public String getUserName() {
		return userName;
	}

	public void setUserName(String userName) {
		this.userName = userName;
	}

	public String getStartTime() {
		return startTime;
	}

	public void setStartTime(String startTime) {
		this.startTime = startTime;
	}

	public String getEndTime() {
		return endTime;
	}

	public void setEndTime(String endTime) {
		this.endTime = endTime;
	}

	public String getMember() {
		return member;
	}

	public void setMember(String member) {
		this.member = member;
	}

	public String getMemberOrServer() {
		return memberOrServer;
	}

	public void setMemberOrServer(String memberOrServer) {
		this.memberOrServer = memberOrServer;
	}

}
